package com.tech.zhidengxian.model.dataobject;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.tech.zhidengxian.mapper.typehandler.JsonTypeHandler;
import com.tech.zhidengxian.model.constant.MessageType;
import lombok.Data;

import java.util.Date;

@Data
@TableName(value = "zdx_message",autoResultMap = true)

public class MessageDO {
  @TableId(value = "id",type = IdType.AUTO)
  private Long id;
  private String content;
  private MessageType messageType;
  private Long cid;
  private Long creatorId;
  private Long receiverId;
  @TableField(typeHandler = JsonTypeHandler.class)
  private UserDO creatorInfo;
  @TableField(typeHandler = JsonTypeHandler.class)
  private UserDO receiverInfo;
  private Date createTime;
  private Date updateTime;
  private Boolean isDeleted;

}
